package com.cqut.service;

import java.util.List;
import java.util.Map;

import com.cqut.dto.LimitShowDTO;
import com.cqut.dto.MenuDTO;
import com.cqut.model.Menu;

public interface IMenuService {
    boolean save(Menu menu);

    boolean update(Menu menu);

    boolean delete(String menuId);

    boolean batchDelete(String[] primaryKeys);

    Menu findModel(String menuId);

    Menu findModel(String menuId, String[] parameters);

    Map<String, Object> findMap(String menuId);

    Map<String, Object> findMap(String menuId, String[][] parameters);

    List<Menu> loadModels();

    List<Menu> loadModels(String condition, Object[] values, String order, String sort, int curPage, int limit);

    List<Menu> loadModels(String[] parameters, String condition, Object[] values, String order, String sort, int curPage, int limit);

    List<Map<String, Object>> loadMaps();

    List<Map<String, Object>> loadMaps(String condition, Object[] values, String order, String sort, int curPage, int limit);

    List<Map<String, Object>> loadMaps(String[][] parameters, String condition, Object[] values, String order, String sort, int curPage, int limit);

    long count();

    long count(String condition, Object[] values);

    long count(String[] parameters, boolean isDistinct);

    long count(String[] parameters, String condition, Object[] values, boolean isDistinct);

	List<Map<String, Object>> findModules(String moduleName,
			LimitShowDTO limitShowDTO);

	boolean judgeRepition(String validationDate);

	boolean moveUp(int orderNo, String moduleId, String parentCode);

	boolean moveDown(int orderNo, String moduleId, String parentCode);

	List<Map<String, Object>> goNextCatalog(String parentCode,
			LimitShowDTO limitShowDTO);

	boolean addModule(MenuDTO menuDTO);

	Object findCountOfModules(String moduleName, String parentCode);
	
	long getLoadListCount(Menu menu, LimitShowDTO limitShowDTO);

	Object searchModuleCount(String moduleName, LimitShowDTO limitShowDTO);

	Map<String, Object> getModuleObjectById(String menuId);

	boolean deleteByIdsAndChild(String[] menuIdList);

	boolean updateModuleObject(Menu menu);

	List<Map<String, Object>> getLoadList(Menu menu, LimitShowDTO limitShowDTO);
		
}
